
<?
$listcat    = ListCatProductHOme();
foreach($listcat as $cat)
{
    $listpro    = ListProductHOme($cat['iId']);
    if(count($listpro)==0)continue;
?>

    <div class="title"><?php echo $cat['cName']?></div>
    <div class="cctt">
    <div class="content">
    <?
    foreach($listpro as $product)
    {
        $imglink    = GetIntroImg($product['cImage'],true);
        $link       = $linkProduct.'/'.getLinkCatProduct($product['iParentId']).$product['cUrlString'].'.htm';
        
        if($product['cDepository']==0 || empty($product['cDepository']))
        {
            $product['cDepository'] = getLang('Sold Out');
        }else
        {
            $product['cDepository'] = getLang('Sold In');
        }
    ?>
    <div class="product">
        <div class="img">
            <a href="<?php echo $link?>">
                <img src="<?php echo $imglink?>" border="0" width="100%" />
            </a>
        </div>
        <div class="tt"><?php echo $product['cName']?></div>
        <div class="sta"><?php echo $product['cDepository']?></div>
        <div class="pri"><?php echo getPriceClient($product['cPrice'])?></div>
        <div class="but">
            <a class="ctiet" href="<?php echo $link?>"></a> 
            <a class="book" href="#add"  onclick="addcart(<?php echo $product['iId']?>)"></a> 
        </div>
    </div>
    <?
    }
    ?>
    <div style="clear: both;">&nbsp;</div>
    </div>
</div>
<div class="ft"></div>
<?
}
?>
